<?php

defined('_JEXEC') or die('Restricted access');
jimport('joomla.application.helper');
require_once(JApplicationHelper::getPath('html'));
JTable::addIncludePath(JPATH_ADMINISTRATOR . DS . 'components' . DS . $option . DS . 'tables');

switch ($task) {

    default:

        showPublishedAppcateogorys($option);
        break;
}

function showPublishedAppcateogorys($option) {
    $db = & JFactory::getDBO();
    $query = "SELECT * FROM aas_app 
  WHERE is_published= '1' and is_deleted='0' and category_id=" . (int) JRequest::getString('id') . " ORDER BY id DESC";
    $db->setQuery($query);
    $rows = $db->loadObjectList();

    if ($db->getErrorNum()) {
        echo $db->stderr();
        return false;
    }
    HTML_App::showApps($rows, $option);
}

?>